package com.zxl.gtion.controller;

import com.zxl.gtion.entity.Video;
import com.zxl.gtion.service.VideoService;
import com.zxl.gtion.util.R;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("video")
@RequiredArgsConstructor
public class VideoController {

    private final VideoService videoService;

    @GetMapping("/getVideoInfo")
    @ApiOperation("获取所有视频信息")
    public R<List<Video>> getVideoInfo(){

        return R.ok(videoService.list());
    }
}
